Matthias Clasen [Wed, 1 Sep 2021 03:01:43 +0000 (23:01 -0400)]
gsk: Add font options to the glyph cache
The cairo_t that we create to render glyphs for
the glyph cache needs to match the font options
that are supposedly governing how glyphs are
drawn.
Since we allow font options to be different per
widget in gtk, we need to have them at least at
the level of individual render nodes. Adding them
to the lookup key for the glyph cache has the
side effect of solving another problem: We are
not flushing the cache when font options change.
Matthias Clasen [Fri, 3 Sep 2021 11:15:52 +0000 (07:15 -0400)]
gsk: Add font options to text nodes
Since font options affect how the glyphs get rendered,
we need to pass the font options down from the gtk level
to where the glyph cache is populated.
Add a new gsk_text_node_new_full api that takes a
cairo_font_options_t in addition to the other parameters.
Matthias Clasen [Fri, 3 Sep 2021 04:19:17 +0000 (00:19 -0400)]
gtk-demo: Improve the font rendering demo
Add a toggle for antialiasing, and make the metrics
hinting turn on rounding of positions, to match what
we do with settings now.
Matthias Clasen [Fri, 3 Sep 2021 14:49:09 +0000 (14:49 +0000)]
Merge branch 'wip/exalm/buttons' into 'master'
Allow custom children on GtkMenuButton
Closes #4205
See merge request GNOME/gtk!3904
Alexander Mikhaylenko [Fri, 3 Sep 2021 11:18:06 +0000 (16:18 +0500)]
menubutton: Support custom children
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/4205
Matthias Clasen [Fri, 3 Sep 2021 00:55:45 +0000 (00:55 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Add a README in gtk/compose
See merge request GNOME/gtk!3916
Matthias Clasen [Fri, 3 Sep 2021 00:10:19 +0000 (20:10 -0400)]
Add a README in gtk/compose
Matthias Clasen [Thu, 2 Sep 2021 22:19:27 +0000 (22:19 +0000)]
Merge branch 'wip/smcv/transparent-is-transparent' into 'master'
reftest-compare: Treat colour channels as undefined if alpha is zero
Closes #4227
See merge request GNOME/gtk!3914
Simon McVittie [Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)]
reftest-compare: Treat colour channels as undefined if alpha is zero
If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
Jiri Grönroos [Thu, 2 Sep 2021 16:06:39 +0000 (16:06 +0000)]
Update Finnish translation
(cherry picked from commit
33a4ae12ef268a399d0dad0b205dd87f501b14da)
Aurimas Černius [Thu, 2 Sep 2021 10:51:39 +0000 (13:51 +0300)]
Updated Lithuanian translation
Matthias Clasen [Thu, 2 Sep 2021 01:33:06 +0000 (01:33 +0000)]
Merge branch 'fix-gst-subproject' into 'master'
media: Check for gstreamer verion instead of using cc.links()
See merge request GNOME/gtk!3910
Matthias Clasen [Wed, 1 Sep 2021 23:15:50 +0000 (23:15 +0000)]
Merge branch 'hint-metrics-setting' into 'master'
Add a gtk-hint-font-metrics setting
See merge request GNOME/gtk!3912
Matthias Clasen [Wed, 1 Sep 2021 21:16:08 +0000 (17:16 -0400)]
Update settings tests
We have a new setting, so the test that is counting
settings needs an update.
Matthias Clasen [Wed, 1 Sep 2021 19:17:53 +0000 (15:17 -0400)]
Add a gtk-hint-font-metrics setting
This lets people switch back to font rendering that is closer
to what GTK 3 does. It is not perfect - subpixel antialiasing
is not going to work. But it give us an Escape hatch while
we shake out the bugs in our linear layout.
Related: #3787
Matthias Clasen [Wed, 1 Sep 2021 16:59:38 +0000 (16:59 +0000)]
Merge branch 'color-glyph-info' into 'master'
Use color glyph information from Pango
See merge request GNOME/gtk!3909
Xavier Claessens [Wed, 1 Sep 2021 12:08:43 +0000 (08:08 -0400)]
media: Check for gstreamer verion instead of using cc.links()
This fix error when gstgl_dep comes from a subproject because in that
case it cannot be used in compiler checks.
Matthias Clasen [Wed, 1 Sep 2021 15:06:26 +0000 (15:06 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Initial support for new Pango attributes
See merge request GNOME/gtk!3911
Matthias Clasen [Wed, 1 Sep 2021 14:32:45 +0000 (10:32 -0400)]
Initial support for new Pango attributes
This is still missing the GtkTextTag hookup,
but it fixes the build.
Danial Behzadi [Wed, 1 Sep 2021 09:42:39 +0000 (09:42 +0000)]
Update Persian translation
Daniel Mustieles [Wed, 1 Sep 2021 09:02:13 +0000 (11:02 +0200)]
Updated Spanish translation
Matthias Clasen [Wed, 1 Sep 2021 05:38:44 +0000 (01:38 -0400)]
Use color glyph information from Pango
Pango now sets a bit in PangoGlyphVisAttr for
color glyphs, so we don't need to do that
ourselves anymore.
Nathan Follens [Tue, 31 Aug 2021 15:54:45 +0000 (15:54 +0000)]
Update Dutch translation
(cherry picked from commit
9aa08dd1b8b633990ac73efb76d9524f7ded32dc)
eshagh shahidani [Tue, 31 Aug 2021 14:41:54 +0000 (14:41 +0000)]
Update Persian translation
(cherry picked from commit
7691c94a3732e0349a4c868982159f613d6222dc)
Matthias Clasen [Tue, 31 Aug 2021 13:15:47 +0000 (13:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
editable: Clarify the docs
See merge request GNOME/gtk!3906
Matthias Clasen [Tue, 31 Aug 2021 12:41:45 +0000 (08:41 -0400)]
editable: Clarify the docs
Make it clear that your class must have all the editable properties
already before you call the (confusingly named) function
gtk_editable_install_properties.
Matthias Clasen [Mon, 30 Aug 2021 18:09:28 +0000 (18:09 +0000)]
Merge branch 'default-settings-non-debug' into 'master'
Revert "reftests: Enforce default settings"
See merge request GNOME/gtk!3903
Matthias Clasen [Mon, 30 Aug 2021 15:01:55 +0000 (11:01 -0400)]
gdk: Make GDK_DEBUG=default-settings unconditional
Our tests use this settings, so we should respect it
in non-debug builds as well.
Matthias Clasen [Mon, 30 Aug 2021 15:01:22 +0000 (11:01 -0400)]
Revert "reftests: Enforce default settings"
This reverts commit
4e4f57e091020750d66134c212d7778c17d96c20.
This should not be necessary, since we have GDK_DEBUG=default-settings.
Matthias Clasen [Mon, 30 Aug 2021 12:52:54 +0000 (12:52 +0000)]
Merge branch 'wip/smcv/compose-files' into 'master'
Fix Compose handling on big-endian host architectures
Closes #4217
See merge request GNOME/gtk!3902
Simon McVittie [Mon, 30 Aug 2021 09:54:43 +0000 (10:54 +0100)]
compose: Update sequences from libX11 1.7.2
This adds support for sequences like <Compose>,G,u -> capital G with
breve. Previously, only a capital U was accepted for E, G, I and O
(but a lower-case u was accepted for A and U for some reason).
Signed-off-by: Simon McVittie <smcv@debian.org>
Simon McVittie [Mon, 30 Aug 2021 09:48:49 +0000 (10:48 +0100)]
compose: Document how to get compose-parse input from libX11 source
Signed-off-by: Simon McVittie <smcv@debian.org>
Simon McVittie [Mon, 30 Aug 2021 09:13:33 +0000 (10:13 +0100)]
compose: Generate endian-dependent compact Compose data
The GtkComposeTable cache is always in big-endian format and is
byteswapped on load for the more common little-endian CPUs, but
init_builtin_table() in GtkIMContextSimple can't byteswap the built-in
data without copying it, which is undesirable. Pregenerate both big-
and little-endian compose data, and compile the correct flavour into
each build of GTK. This fixes failure of the composetable test when
building for a big-endian architecture such as s390x and (traditional,
big-endian) powerpc.
Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217
Signed-off-by: Simon McVittie <smcv@debian.org>
Benjamin Otte [Mon, 30 Aug 2021 04:37:49 +0000 (04:37 +0000)]
Merge branch 'wip/otte/for-master' into 'master'
fontbutton: Make sure the window is on the same display
See merge request GNOME/gtk!3901
Benjamin Otte [Mon, 23 Aug 2021 05:06:37 +0000 (07:06 +0200)]
contentdeserializer: Fix some API awkwardness
Allow uninitialized GValues to be passed. Makes life easier for the
inspector code I'm writing.
Benjamin Otte [Fri, 20 Aug 2021 03:52:54 +0000 (05:52 +0200)]
node-editor: Allow dragging and dropping the center picture
Dragging will just drag the render node.
Dropping will replace the current contents of the textview with the
dropped node.
Neat side effect: You can drag the node onto itself to do a
deserialize/serialize of the current text.
Benjamin Otte [Fri, 20 Aug 2021 03:52:10 +0000 (05:52 +0200)]
recorder: Make the render nodes in the list draggable
You can (soon) drag any of the nodes directly into the node-editor.
Benjamin Otte [Fri, 20 Aug 2021 03:51:20 +0000 (05:51 +0200)]
dragicon: Add a default drag icon for GskRenderNode
Somebody should make this default drag icon machinery pluggable.
Benjamin Otte [Thu, 19 Aug 2021 22:30:04 +0000 (00:30 +0200)]
rendernode: Add (de)serialization support for render nodes
This includes our own new mime type for render nodes, too.
Benjamin Otte [Thu, 19 Aug 2021 21:36:16 +0000 (23:36 +0200)]
rendernode: Add GValue functions for render nodes
This is needed as GskRenderNode is its own fundamental type and has its
own GValue infrastructure. And I want to put render nodes into the
clipboard which uses GValues.
Benjamin Otte [Mon, 23 Aug 2021 05:06:25 +0000 (07:06 +0200)]
stylecontext: Remove unneeded headers
Benjamin Otte [Mon, 23 Aug 2021 03:55:56 +0000 (05:55 +0200)]
fontbutton: Destroy dialog in unrealize()
This way, we can be sure it's always using the right display.
We can also be sure that it doesn't leak.
Benjamin Otte [Mon, 23 Aug 2021 03:55:32 +0000 (05:55 +0200)]
fontbutton: Make sure the window is on the same display
We don't want the font buttons created by the inspector to run on the
default display.
Benjamin Otte [Mon, 30 Aug 2021 03:54:35 +0000 (03:54 +0000)]
Merge branch 'wip/otte/symbolic-paintable' into 'master'
Add GtkSymbolicPaintable
See merge request GNOME/gtk!3895
Benjamin Otte [Mon, 30 Aug 2021 03:50:30 +0000 (03:50 +0000)]
Merge branch 'wip/otte/G_TYPE_POINTER' into 'master'
Get rid of G_TYPE_POINTER
See merge request GNOME/gtk!3900
Benjamin Otte [Mon, 30 Aug 2021 02:56:43 +0000 (04:56 +0200)]
symbolicpaintable: Refactor default colors path
Benjamin Otte [Mon, 30 Aug 2021 02:52:47 +0000 (04:52 +0200)]
icontheme: Refactor gtk_icon_theme_lookup_symbolic_colors()
With the new enum, the code looks much cleaner.
Benjamin Otte [Mon, 30 Aug 2021 02:32:22 +0000 (04:32 +0200)]
enums: Add a GtkSymbolicColor enum
That way we don't nedmagic numbres to index the colors array.
Use it in the symbolic paintable demo.
Baurzhan Muftakhidinov [Sun, 29 Aug 2021 17:08:32 +0000 (17:08 +0000)]
Update Kazakh translation
(cherry picked from commit
37d2d407a192fc14df211ea57a788ffe3fd16762)
Baurzhan Muftakhidinov [Sun, 29 Aug 2021 07:41:36 +0000 (07:41 +0000)]
Update Kazakh translation
(cherry picked from commit
9e62fd82ea130b4eca052bf1313910c44a221b7e)
Benjamin Otte [Sun, 29 Aug 2021 04:10:31 +0000 (06:10 +0200)]
searchengine: Rename private headers
The code uses G_TYPE_POINTER and I got all sorts of scared.
Benjamin Otte [Sun, 29 Aug 2021 03:56:31 +0000 (05:56 +0200)]
filesystemmodel: Don't use G_TYPE_POINTER
It's a GError, use G_TYPE_ERROR.
Benjamin Otte [Sun, 29 Aug 2021 02:48:49 +0000 (04:48 +0200)]
placessidebar: Don't use G_TYPE_POINTER
We have a type for lists of GFiles. We invented it for DND.
Keep the annotation info, so bindings don't have to know this.
Benjamin Otte [Sun, 29 Aug 2021 02:47:50 +0000 (04:47 +0200)]
pathbar: Use correct GType in signal
Benjamin Otte [Sat, 28 Aug 2021 01:46:55 +0000 (03:46 +0200)]
gtk-demo: Add a symbolic paintable demo
Don't click the button!
Benjamin Otte [Fri, 27 Aug 2021 21:44:42 +0000 (23:44 +0200)]
gtk-demo: Explicitly pass nuclear icon colors
Benjamin Otte [Fri, 27 Aug 2021 22:23:29 +0000 (00:23 +0200)]
gtk: Port icontheme to GtkSymbolicPaintable
Benjamin Otte [Fri, 27 Aug 2021 21:33:56 +0000 (23:33 +0200)]
gtk: Add the GtkSymbolicPaintable interface
Benjamin Otte [Sun, 29 Aug 2021 00:47:34 +0000 (02:47 +0200)]
build: Check that introspection is enabled for docs build
Benjamin Otte [Sun, 29 Aug 2021 02:27:58 +0000 (04:27 +0200)]
docs: Fix vfunc references
vfunc references should just use the object name, not the
class/interface/iface name.
Matthias Clasen [Sat, 28 Aug 2021 21:21:02 +0000 (21:21 +0000)]
Merge branch 'text-selection-missing' into 'master'
ngl: Avoid a coordinate overflow
Closes #4214
See merge request GNOME/gtk!3897
Matthias Clasen [Sat, 28 Aug 2021 19:42:30 +0000 (15:42 -0400)]
ngl: Avoid a coordinate overflow
This was showing up as big text selections going
missing sporadically.
Fixes: #4214
Matthias Clasen [Sat, 28 Aug 2021 17:18:21 +0000 (17:18 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
Draw negatively sloped carets correctly
See merge request GNOME/gtk!3892
Matthias Clasen [Sat, 28 Aug 2021 17:17:43 +0000 (17:17 +0000)]
Merge branch 'menu-accel' into 'master'
window: Prefer menu bars when handling F10
See merge request GNOME/gtk!3893
Matthias Clasen [Sat, 28 Aug 2021 17:17:00 +0000 (17:17 +0000)]
Merge branch 'randr' into 'master'
x11: Fix handling of `RRScreenChangeNotify`/`RRNotify` events
See merge request GNOME/gtk!3894
Ian Douglas Scott [Sat, 28 Aug 2021 00:57:01 +0000 (17:57 -0700)]
x11: Fix handling of `RRScreenChangeNotify`/`RRNotify` events
It seems these are sent with `xwindow` set to the root window, so this
was failing to find a surface and get the screen from that.
I'm not sure if there's a reason not to get the screen this way
elsewhere in the function, but it seems this should be correct.
This fixes the behavior of `gdk_x11_display_get_monitors()`, which
wasn't correctly changing when monitors were added or removed. For
instance, this python code was always showing the same number of
monitors when one was turned off and on, but updates correctly with this
change applied:
```python
import gi
gi.require_version("GLib", "2.0")
gi.require_version("Gdk", "4.0")
gi.require_version("Gtk", "4.0")
from gi.repository import GLib, Gdk, Gtk
def f():
print(len(Gdk.Display.get_default().get_monitors()))
return True
GLib.timeout_add_seconds(1, f)
GLib.MainLoop().run()
```
Enrico Nicoletto [Sat, 28 Aug 2021 01:00:26 +0000 (01:00 +0000)]
Update Brazilian Portuguese translation
(cherry picked from commit
cd9735eab134810b8d7182f1f1bca86b27207514)
Enrico Nicoletto [Sat, 28 Aug 2021 00:44:25 +0000 (00:44 +0000)]
Update Brazilian Portuguese translation
(cherry picked from commit
8f5a1471cc3227e91dbb5b3d2c47f7c999d74201)
Florian Müllner [Fri, 27 Aug 2021 22:10:00 +0000 (00:10 +0200)]
window: Prefer menu bars when handling F10
Focusing the first widget in the titlebar is a good fallback,
but a "real" menubar or :primary menu button should take
precedence.
Matthias Clasen [Fri, 27 Aug 2021 21:19:04 +0000 (17:19 -0400)]
Draw negatively sloped carets correctly
The code for handling negatively sloped caret
positions was not tested, and naturally did
not work. Fix it.
Matthias Clasen [Fri, 27 Aug 2021 01:37:57 +0000 (01:37 +0000)]
Merge branch 'css-line-decoration' into 'master'
textview: Apply line decoration from css
See merge request GNOME/gtk!3890
Matthias Clasen [Fri, 27 Aug 2021 00:45:17 +0000 (20:45 -0400)]
Clean up the code
Avoid compiler warnings, and make the code
a bit more compact.
Matthias Clasen [Fri, 27 Aug 2021 00:21:23 +0000 (20:21 -0400)]
textview: Apply font features from css
We were forgetting to propagate these values from
CSS to the default attributes. Share the code for
getting these values out of a GtkCssStyle.
Matthias Clasen [Thu, 26 Aug 2021 22:53:30 +0000 (18:53 -0400)]
textview: Apply text transform from css
We were forgetting to propagate these values from
CSS to the default attributes.
Matthias Clasen [Thu, 26 Aug 2021 22:45:38 +0000 (18:45 -0400)]
textview: Apply line decoration from css
We were forgetting to propagate these values from
CSS to the default attributes.
Matthias Clasen [Thu, 26 Aug 2021 19:37:55 +0000 (19:37 +0000)]
Merge branch 'css-letter-spacing' into 'master'
textview: Don't forget to collect css letterspacing
Closes #4207
See merge request GNOME/gtk!3889
Matthias Clasen [Thu, 26 Aug 2021 19:01:23 +0000 (15:01 -0400)]
textview: Don't forget to collect css letterspacing
There are more properties missing, this is just
the start.
Fixes: #4207
Andika Triwidada [Thu, 26 Aug 2021 14:40:03 +0000 (14:40 +0000)]
Update Indonesian translation
(cherry picked from commit
85ad1db8efaabace38cb9b37bfac1d729925b8ec)
Hugo Carvalho [Thu, 26 Aug 2021 14:29:50 +0000 (14:29 +0000)]
Update Portuguese translation
(cherry picked from commit
6e467de751d83f3212d4e758b3d52abd555d5477)
Hugo Carvalho [Thu, 26 Aug 2021 14:12:47 +0000 (14:12 +0000)]
Update Portuguese translation
(cherry picked from commit
ae5b6395ade25da06da25157ed39e399db3a4061)
Andika Triwidada [Thu, 26 Aug 2021 13:38:46 +0000 (13:38 +0000)]
Update Indonesian translation
(cherry picked from commit
dcc899b6212aceca7c5687c6cd4a24214e84d27e)
Marek Černocký [Thu, 26 Aug 2021 13:07:54 +0000 (15:07 +0200)]
Updated Czech translation
Timm Bäder [Thu, 26 Aug 2021 11:15:28 +0000 (11:15 +0000)]
Merge branch 'clang-fallthrough' into 'master'
build: fix implicit-fallthrough errors with clang
See merge request GNOME/gtk!3887
Jordi Mas [Thu, 26 Aug 2021 11:10:32 +0000 (13:10 +0200)]
Update Catalan translation
Matthias Clasen [Thu, 26 Aug 2021 06:15:06 +0000 (06:15 +0000)]
Merge branch 'matthiasc/for-master' into 'master'
More markup demos
See merge request GNOME/gtk!3888
Christoph Reiter [Thu, 26 Aug 2021 03:14:18 +0000 (05:14 +0200)]
build: fix implicit-fallthrough errors with clang
The clang build fails due to -Werror=implicit-fallthrough being
on by default and some fallthrough cases not being marked as such.
Use G_GNUC_FALLTHROUGH or duplicate the code in those cases.
Matthias Clasen [Wed, 25 Aug 2021 23:38:59 +0000 (19:38 -0400)]
More markup demos
Showing more of what Pango can do.
Matthias Clasen [Wed, 25 Aug 2021 20:11:45 +0000 (20:11 +0000)]
Merge branch 'new-pango-attributes' into 'master'
Support new pango attributes
See merge request GNOME/gtk!3878
Matthias Clasen [Wed, 25 Aug 2021 19:11:23 +0000 (19:11 +0000)]
Merge branch 'treeexpander-claim-gestures' into 'master'
GtkTreeExpander: claim expander-icon gestures
Closes #4199
See merge request GNOME/gtk!3886
Matthias Clasen [Tue, 24 Aug 2021 16:47:12 +0000 (12:47 -0400)]
textview: Implement new pango attributes
Implement the word and sentence attributes.
Matthias Clasen [Tue, 24 Aug 2021 16:48:40 +0000 (12:48 -0400)]
Support new pango attributes
Support new Pango attributes for segmentation
in GtkBuilder.
Jan Lukas Gernert [Wed, 25 Aug 2021 15:50:12 +0000 (17:50 +0200)]
GtkTreeExpander: claim expander-icon gestures
Claim the pressed, released and canceled gestures
meant for the expander-icon of the TreeExpander.
This avoids selecting the row when expanding or collapsing it.
Closes #4199
Matthias Clasen [Wed, 25 Aug 2021 13:43:24 +0000 (13:43 +0000)]
Merge branch 'sloped-caret' into 'master'
Implement sloped caret drawing
See merge request GNOME/gtk!3880
Jordi Mas [Wed, 25 Aug 2021 13:17:27 +0000 (15:17 +0200)]
Update Catalan translation
Matthias Clasen [Wed, 25 Aug 2021 11:48:59 +0000 (11:48 +0000)]
Merge branch 'treeexpander-indent-property' into 'master'
GtkTreeExpander: indent-without-expander property
Closes #4175
See merge request GNOME/gtk!3858
Matthias Clasen [Wed, 25 Aug 2021 11:48:11 +0000 (11:48 +0000)]
Merge branch '4195-include-gdkprivate-h' into 'master'
gdkmacoseventsource: Include "gdk-private.h"
Closes #4195
See merge request GNOME/gtk!3882
Matthias Clasen [Tue, 24 Aug 2021 20:49:30 +0000 (16:49 -0400)]
Use pango_layout_get_caret_pos
This new api returns rectangles for sloped carets,
in contrast to pango_layout_get_cursor_pos, which
always returns a rectangle with a width of zero.
Matthias Clasen [Mon, 23 Aug 2021 21:39:04 +0000 (17:39 -0400)]
Implement sloped caret drawing
Prepare for Pango to return slope information for carets.
While we are at it, improve the shape of our carets a bit.
Matthias Clasen [Wed, 25 Aug 2021 10:51:57 +0000 (10:51 +0000)]
Merge branch 'fix-gettext' into 'master'
Fix wrong gettext ITS target
See merge request GNOME/gtk!3881
Rafał Dzięgiel [Wed, 25 Aug 2021 08:08:44 +0000 (10:08 +0200)]
Fix wrong gettext ITS target
The installed ITS rule filename is "gtk4builder.its". The .loc file
is wrongly pointing to old "gtkbuilder.its" which makes gettext fail
on systems without GTK3 installed.